'''
Created on 18/11/2011

@author: Byron
'''
from tkinter import *
from LogPlayer import LogPlayer

class Log:

    def __init__(self, pContainer, pPlayer1, pPlayer2):
        self._Player1 = pPlayer1
        self._Player2 = pPlayer2
        #Crear canvas
        canvasLog  = Canvas(pContainer, width=160, height=440)
        #widgets
        self._LogJugador1 = LogPlayer(canvasLog, pPlayer1, 20)
        self._LogJugador2 = LogPlayer(canvasLog, pPlayer2, 235)
        #Ubicar canvas
        canvasLog.place(x=450, y=0)

    def addInfo(self, pPlayer, pInfo):
        if( pPlayer == self._Player1 ):
            self._LogJugador1.addInfo(pInfo)
        else:
            self._LogJugador2.addInfo(pInfo)
            
    def setMensajero(self,pMensajero):
        self._Mensajero = pMensajero
        
    def getMensajero(self):
        return self.getMensajero()
    
        
        
        